System and method of time of flight detection

ABSTRACT

A position-determining apparatus, such as a GPS receiver, determines the position of the mobile device based on the time of flight of a transmitted probe signal using a method in which sections of the received signal is classified into two or more categories and accumulated according to categories before being used to compute the correlations familiar in the context of a matched filter. Using the method of the present invention to compute the correlations, and optionally applying additional time-saving techniques described herein, a position determination is achieved using arithmetic operations that are significantly reduced from that required in prior art methods to compute the correlations. The reduced number of arithmetic operations can reduce significantly the power consumption required of a device carrying out a method of the present invention, and thereby realizing a significant advantage.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application relates to and claims priority of U.S. patentapplication (“Parent Application I”), Ser. No. 15/661,477, entitled“System and Method of Time of Flight Detection,” filed on Jul. 27, 2017,which is a continuation of U.S. patent application (“Parent ApplicationII”), Ser. No. 15/220,360, entitled “System and Method of Time of FlightDetection,” filed on Jul. 26, 2016, now U.S. Pat. No. 9,723,444, whichis a continuation application of U.S. patent (“Parent Application III”),Ser. No. 14/826,128, filed on Aug. 13, 2015, now U.S. Pat. No.9,439,040, which claims priority to U.S. provisional application(“Copending Provisional Application”), Ser. No. 62/037,607, entitled“Time of Flight Detection,” filed on Aug. 15, 2014. The ParentApplications I-III and the Copending Provisional Application are herebyincorporated by reference herein in their entireties.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention is related to measuring the distance between twoobjects based on a time of flight of a probe signal sent between theobjects. In particular, the present invention is related to measuringthe distance between two objects using a positioning system, such as theGlobal Positioning System (GPS).

2. Discussion of the Related Art

The “time of flight” of a signal is often used to determine the positionor the time of the objects. The “time of flight” is a time-offsetmeasured between the time a probe signal is sent and the time the probesignal is received. The distance between the objects is the product ofthe time of flight and the propagation speed of the probe signal (e.g.,the speed of light, in the case of a GPS signal). In the GPS system, thetime of flight is referred to as a “pseudo-range measurement.” In manysystems, the time of flight may be used in additional calculations. Forexample, in the GPS system, multiple pseudo-range measurements are usedto determine a 3-dimensional position of an object relative to theearth. The clock offset may also be calculated to further refine theaccuracy in the calculated location. Detailed descriptions of variousaspects of the GPS system may be found, for example, in “Global PositionSystem: Signals, Measurement and Performance” (“Enge”) by Pratap Misraand Per Enge, and its cited references.

SUMMARY

According to one embodiment of the present invention, aposition-determining apparatus, such as a GPS receiver, determines theposition of the mobile device based on the time of flight of atransmitted probe signal using a method in which sections of thereceived signal is classified into two or more categories andaccumulated according to categories before being used to compute thecorrelations familiar in the context of a matched filter.

Using the method of the present invention to compute the correlations,and optionally applying additional time-saving techniques describedherein, the present invention allows a position determination to beachieved using a number of arithmetic operations that is significantlyreduced from that required in prior art methods to compute thecorrelations. The reduced number of arithmetic operations can reducesignificantly the power consumption required of a device carrying out amethod of the present invention, and thereby realizing a significantadvantage.

The present invention is better understood upon consideration of thedetailed description below in conjunction with the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of GPS receiver 100, in accordance with oneembodiment of the present invention.

FIG. 2 is a block diagram showing an implementation of offsetcalculation channel 200, which is representative of any of channels103-1, 103-2, . . . 103-c of FIG. 1, according to one embodiment of thepresent invention.

FIG. 3 is a flow chart that illustrates a method of operation for anoffset calculation channel (e.g., offset calculation channel 200 of FIG.2), in accordance with one embodiment of the present invention.

FIG. 4 is a flow chart that illustrates the operations in fine offsetestimation step 302 of FIG. 3, in accordance with one embodiment of thepresent invention.

FIG. 5 shows a binary probe signal (i.e., having values expressed byeither the +1 level or −1 level), in accordance with one embodiment ofthe present invention.

FIG. 6 illustrates dividing demodulated signal 604 into sections, inaccordance with one embodiment of the present invention.

FIG. 7 shows the waveforms of probe signals 702, 703, 705, and 706, andcenter probe signal 704, before, between and after section boundaries701, in accordance of the present invention.

FIG. 8 illustrates masked probe signal s_(m)(n), according to oneembodiment of the present invention.

FIG. 9 illustrates a categorization scheme for center probe signal 903,in which the 2-bit value representing the category of each section isassigned based on whether or not transitions exist in the previous andthe following chips, in accordance with one embodiment of the presentinvention.

FIG. 10 illustrates a categorization scheme in which the category of asection is encoded by a 3-bit value representing, respectively, whetheror not the previous, current and next section includes a signaltransition, according to one embodiment of the present invention.

FIG. 11 shows how, using the probability threshold scheme, theprobability distribution of relative offset x evolves in time forcategory 1 sections under single-T categorization and masking (i.e.,sections in which a transition occurs in the corresponding probesignal), in accordance with the present invention.

FIG. 12 is a flow chart illustrating method 1200 for operating anaccumulator, according to one embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following detailed description, a probe signal transmittedbetween two objects may refer to a probe signal sent from one object andreceived by the other object or, alternatively, a signal sent by oneobject, reflected from the second object and then received by the firstobject. The present invention is applicable to the GPS or, moregenerally, the Global Navigation Satellite System (GNSS), which includesGPS, GLONASS, Galileo, Beidou, and other similar systems. In fact, thepresent invention is applicable not only to GNSS/GPS systems, but alsoin any time-offset measurement systems. For example, the presentinvention is applicable to measuring a time of fight of a radar probesignal that is sent from a radar antenna, reflected by the target objectand then received by the radar antenna. As another example, the presentinvention is also applicable to determining a time of flight of a signalthat is transmitted from a local sender to a local receiver to make alocal position measurement. The time-of-flight technique can be appliedto signal synchronization in communication systems. In this detaileddescription, a GPS receiver is used to illustrate the present invention.However, the present invention is not limited to application in a GPSreceiver, but also in the applications mentioned above, as well as otherapplications.

FIG. 1 is a block diagram of GPS receiver 100, in accordance with oneembodiment of the present invention. As shown in FIG. 1, signals ofmultiple GPS satellites are received by antenna 101. These signals aretypically amplified, demodulated and down-converted to an intermediatefrequency (IF). Each signal may also be digitized by the RF front end102 for processing in the digital domain. The resulting signal is thenprocessed by one or more offset calculation channels, 103-1, 103-2, . .. 103-c, each of which determines if the received signal includes asignal transmitted from a corresponding GPS satellite. For each GPSsatellite signal identified, an offset or time of flight between thatGPS satellite and GPS receiver 100 is calculated. CPU 104 furtherprocesses the offsets determined from the offset calculation channels103-1, 103-2, . . . 103-c to calculate receiver 100's position and time.CPU 104 also controls offset calculation channels, 103-1, 103-2, . . .103-c. Details of offset calculation channels, 103-1, 103-2, . . . 103-cand their control are provided below. In FIG. 1, CPU 104 generallyrefers to both the CPU circuit itself and any memory, storage (e.g.,RAM, ROM, FLASH memory, and hard disk drives) or other componentsnecessary for supporting CPU operations.

FIG. 2 is a block diagram showing an implementation of offsetcalculation channel 200, which is representative of any of channels103-1, 103-2, . . . 103-c of FIG. 1, according to one embodiment of thepresent invention. As shown in FIG. 2, block 201 represents providingdigitalized in-phase and quadrature signals (i.e., I and Q signals)generated from RF front end 102. The I and Q digitized quadraturesignals are fed into channel-specific demodulator 202. Channel-specificdemodulator 202, which receives a variable frequency signal fromnumerical oscillator (NCO) 203, removes any remaining frequencymodulation effects caused by, for example, the Doppler effect, receivermovement, local clock drift and any other effects. Each channel includesa channel-specific NCO and a channel-specific demodulator, representedby NCO 203 and channel-specific demodulator 202 described above. Thedemodulated I and Q signals are then processed in offset estimator 204.CPU 205 controls NCO 203, channel-specific demodulator 202 and offsetestimator 204. CPU 205 may be a stand-alone computational circuit, ormay be implemented by CPU 104, which is the overall system controlcircuit shown in FIG. 1.

FIG. 3 is a flow chart that illustrates a method of operation for anoffset calculation channel (e.g., offset calculation channel 200 of FIG.2), in accordance with one embodiment of the present invention. As shownin FIG. 3, step 301 performs a coarse estimation, also commonly known as“signal acquisition” in many GPS/GNSS systems. Coarse estimation reducesthe search ranges of the offset and the frequency modulation inpreparation for a fine estimation, which is represented in FIG. 2 bystep 302. For example, a coarse estimation or signal acquisition in aGPS system may provide a position accuracy of about 0.5 chip (each chipis a time unit that is about 1 μs long) and a Doppler frequencyestimation accuracy of between 100 Hz to 500 Hz. Coarse offsetestimation can be assisted by reference to other information, such as alocation estimate from a cell phone tower. A system that uses suchassistance information is called an Assisted GPS (AGPS) system.Structures and operations of AGPS are discussed, for example, in Enge.Coarse estimation step 301 may also provide an estimate of thesignal-to-noise ratio (SNR) in the received signal, an offset accuracy(or “offset error”) and frequency accuracy (or “frequency error”).

Step 302 provides a fine estimation, which estimates the offset and thefrequency modulation each to a higher resolution. For example, in oneembodiment of the present invention, a fine estimation searches over anoffset between −0.5 chip to 0.5 chip, and a frequency modulation between−250 Hz to 250 Hz. Due to various reasons, either one or both of coarseestimation step 301 and fine estimation step 302 may not always succeed.At step 303, if an estimation step is not successful, coarse estimationstep 301 is repeated. After a successful fine estimation step, theoffset calculation channel may enter into a wait or idle step for apredetermined time (i.e., step 304), before repeating fine estimationstep 302. The wait time reduces power consumption in GPS receiver 100.

FIG. 4 is a flow chart that illustrates the operations in fineestimation step 302 of FIG. 3, in accordance with one embodiment of thepresent invention. Generally, the fine estimation step keeps and updatesa set of statistical states based on data samples of the received signalcollected and the time passed. In one embodiment, these statisticalstates are related to the probability distribution of the offset.(Conversely, the probability distribution of the offset may be derivedfrom these statistical states). In some embodiments, the probabilitydistribution of the offset can be used as the statistical statesdirectly. For example, in one embodiment, the statistical states arerepresented by quantities that are proportional to the logarithms of theprobability distribution. (Such a representation allows multiplicationsof probabilities to be performed as additions of the logarithms of theprobabilities).

As shown in FIG. 4, at step 401, a prior estimation of probabilitydistribution P₀(x) of offset x is obtained. In one embodiment,probability distribution P₀(x) may be obtained from coarse estimationstep 301. For example, in one embodiment, a distribution P(x) of offsetx is obtained from a signal acquisition in a GPS receiver, with P(x)spanning the search range x∈[−t_(c)/2,t_(c)/2], where t_(c) is the chiptime. The probability that offset x is outside this search range in thisembodiment is believed small. Initial distribution estimation P₀(x) maybe obtained from side information, such as assistance data from a celltower. The initial search range can be the range covered by thecommunication range of the cell tower. In some embodiments, initialdistribution P₀(x) may be a rough estimate, while in other embodiments,a simple uniform distribution can be used, when only the range of offsetx is estimated during signal acquisition. In other embodiments, when astandard deviation is estimated for offset x during signal acquisition,a Gaussian distribution may be used.

In step 402, data samples of the received probe signal are taken, whichare used to update the probability distribution P(x) at step 402. Asprobability distribution P(x) corresponds to the statistical states inthis embodiment, an update to probability distribution P(x) at step 403updates the statistical states. At step 404, an updated estimation foroffset x is then performed based on the updated probability distributionP(x). A successfully update for offset x is output at step 405.Alternatively, if the calculate value for offset x requires refinementto meet a predetermined accuracy requirement, additional data samples ofthe received probe signals are taken by returning to step 402.Otherwise, i.e., if offset x cannot be estimated within the currentsearch range, a failure signal is output at step 408. In that case, anew coarse estimate is performed by returning to coarse estimation step301, for example, as illustrated above in conjunction with FIG. 3. Atstep 406, upon a successful estimate of offset x, the estimator may waitor idle at step 406 for a predetermined time period to save power. Thepredetermined time period may be specified by the user. Probabilitydistribution P(x)—and therefore correspondingly, the statistical statesalso—is updated at step 407, after a specified elapsed time at step 406.The offset can be estimated by calculating the expected value of offsetx from probability distribution P(x). The variance of the estimation foroffset x can also be obtained from the probability distribution. Theoperations for updating probability distributions and for performingdata sampling may depend on the characteristics of the probe signal, itstransmission, propagation, reception and processing.

In one embodiment, a binary probe signal alternates between a +1 leveland a −1 level, as illustrated in FIG. 5. As shown in FIG. 5, the probesignal may transition or “jump” from the +1 level to the −1 level, orfrom the −1 level to the +1 level. GPS C/A signal and GNSS BOC signalsare examples of binary signals. The probe signal remains at each statefor at least a chip before the next transition. In GPS/GNSS, eachsatellite is assigned a special code sequence, which is encoded in thetransmitted signal by the +1 and −1 signal levels and periodicallyrepeated. The code sequence spans 1023 chips in GPS C/A. The transmittedprobe signal may be further modulated, such as by a predeterminedcarrier signal of a predetermined frequency (e.g., a carrier frequencyat about 1.575 GHz for GPS C/A).

In one embodiment, the received signal is sampled at intervals eachhaving a duration t_(s) which is a fraction of chip time t_(c):

$\begin{matrix}{t_{s} = \frac{t_{c}}{M}} & (1)\end{matrix}$

where M is an integer. In some embodiments, one can also choose M to beclose to an integer, or a fraction, and achieve the same or similaradvantages of the present invention. The signal may distort along theway of processing and transmission. Typically, the signal passes througha transmission filter, a modulator, a transmission antenna, thecommunication channel (e.g., free space), a reception antenna, areceiver filter, and a demodulator. The distortion may exhibit itself asan actual longer transition time than its nominal time, resulting in aslope or other artifacts. In one embodiment, M is chosen so that, evenin the distorted signal, each transition completes in less than durationt_(s). In one embodiment, samples of the demodulated signal (at IF) fromonly I or Q (i.e., in-phase or quadrature, respectively) channels areused. When the demodulated signal has close to zero phase, only Ichannel is required. In some embodiments, both in-phase and quadraturesamples are taken. When only one of the I and Q channels is used, thesamples are taken at relative time 0, t_(s), 2t_(s), 3t_(s), . . . ,nt_(s), and are denoted y(0), y(1), y(2), . . . , y(n), . . . .Alternatively, when both I and Q channels are sampled, the output signaly(n) is complex-valued:

y(n)=yI(n)+jyQ(n)  (2)

where

${j = \sqrt{- 1}},$

and yI(n) and yQ(n) represent, respectively, the in-phase and quadraturesamples of the demodulated signal at time n.

Let signal s(n) represent a replica of the probe signal with a timeoffset at the center of the estimated search range (“center probesignal”). Signal s(n) can be interpreted as the expected undistortedform of the received signal based on prior knowledge (e.g., knowledgefrom the coarse estimation step 301, described above). Further, let xdenote the estimated offset between the noise-less demodulated signaland center probe signal s(n) (“relative offset”). The pseudo-range andthe location of the receiver may be derived based on relative offset x.Choosing signal s(n) to have a relative offset at the center of thesearch range is merely for mathematical convenience. The offset ofsignal s(n) may be set at any other position within the search range(e.g., at the beginning of the search range).

The probability distribution may be updated according to Bayes' Rule:

$\begin{matrix}{{P\left( x \middle| y \right)} = \frac{{P(x)}{P\left( y \middle| x \right)}}{P(y)}} & (3)\end{matrix}$

where P(x|y) is an estimation of the probability distribution of offsetx after samples y of the demodulated signal are observed. Since P(y) isindependent of x, P(y) is a normalization factor that need not beexplicitly calculated. Taking the logarithm on both sides of equation(3), one obtains the log likelihood equation.

L(x|y)=L(x)+L(y|x)−L(y)  (4)

where L denotes the log likelihood operation, or in general,

L(P)=log(P)  (5)

Let y(n) be modeled as the sum of a noise-less received signal z(n) andan additive noise ε(n):

y(n)=γz(n)+ε(n)  (6)

where γ is the gain of the communication channel and ε(n) is assumed tohave a Gaussian distribution. Signal z(n) may be assumed to be a shiftedversion of signal s(n) discussed above. (Empirically, based on analysisof the transitions of the received signal, this assumption is good formost cases.) That is:

z(n)=s(n−x)  (7)

where x denotes the relative offset. Thus, z(n) is also referred to inthis detailed description as “the shifted signal.”

Without loss of generality, one may set an expect magnitude of thesignal to be 1 (i.e. E[|s(n)|]=1). The signal-to-noise ratio (SNR) ofsignal y(n) is provided by:

$\begin{matrix}{{S\; N\; R} = \frac{\gamma^{2}}{\sigma^{2}}} & (8)\end{matrix}$

where σ is the standard deviation of the Gaussian distribution ofadditive noise ε(n). Thus,

$\begin{matrix}{{L\left( y \middle| x \right)} = {\sum\limits_{n = 0}^{N - 1}{L\left( {y(n)} \middle| {s\left( {n - x} \right)} \right)}}} & (9)\end{matrix}$

As additive noise ε(n) is presumed Gaussian:

$\begin{matrix}{L\left( {\left. {y(n)} \middle| {s\left( {n - x} \right)} \right. = {\beta_{0} - {\frac{1}{2\; \sigma^{2}}\left( {{y(n)} - {\gamma \; {s\left( {n - x} \right)}}} \right)^{2}}}} \right.} & (10)\end{matrix}$

where β₀ is a constant. Accordingly,

$\begin{matrix}{\sum\limits_{n = 0}^{N - 1}{L\left( {\left. {y(n)} \middle| {s\left( {n - x} \right)} \right. = {{N\; \beta_{0}} - {\frac{1}{2\; \sigma^{2}}\left( {{\sum\limits_{n = 0}^{N - 1}{y^{2}(n)}} - {\gamma^{2}{\sum\limits_{n = 0}^{N - 1}{s^{2}\left( {n - x} \right)}}} + {2\; \gamma {\sum\limits_{n = 0}^{N - 1}{{y(n)}{s\left( {n - x} \right)}}}}} \right.}}} \right.}} & (11)\end{matrix}$

Assuming that the y²(n) and the s²(n) terms are constant, equation (11)can be rewritten as:

$\begin{matrix}{\sum\limits_{n = 0}^{N - 1}{L\left( {\left. {y(n)} \middle| {s\left( {n - x} \right)} \right. = {\beta_{1} + {\frac{\gamma}{\sigma^{2}}{\sum\limits_{n = 0}^{N - 1}{{y(n)}{s\left( {n - x} \right)}}}}}} \right.}} & (12)\end{matrix}$

where β₁ is a normalization factor. Define the quantity L′(y|x)(“un-normalized log likelihood of signal y(n) given offset x”) as:

$\begin{matrix}{{L^{\prime}\left( y \middle| x \right)} = {\sum\limits_{n = 0}^{N - 1}{L^{\prime}\left( {\left. {y(n)} \middle| {s\left( {n - x} \right)} \right. = {\frac{\gamma}{\sigma^{2}}{\sum\limits_{n = 0}^{N - 1}{{y(n)}{s\left( {n - x} \right)}}}}} \right.}}} & (13)\end{matrix}$

Since the correlation operation over two signals v(n) and s(n) is givenby:

$\begin{matrix}{{{conv}\; \left( {u,v,x} \right)} = {\sum\limits_{n = 0}^{N - 1}{{v(n)}{u\left( {n - x} \right)}}}} & (14)\end{matrix}$

Equation (13) can be rewritten as:

$\begin{matrix}{{L^{\prime}\left( y \middle| x \right)} = {\sum\limits_{n = 0}^{N - 1}{L^{\prime}\left( {\left. {y(n)} \middle| {s\left( {n - x} \right)} \right. = {\frac{\gamma}{\sigma^{2}}{{Conv}\left( {y,s,x} \right)}}} \right.}}} & (15)\end{matrix}$

Recalling from equation (8) above, the factor γ/σ² can be obtained fromthe SNR and σ:

$\begin{matrix}{\frac{\gamma}{\sigma^{2}} = \frac{\sqrt{S\; N\; R}}{\sigma}} & (16)\end{matrix}$

Normalizing the probability distribution ensures that the sum of allprobabilities equals 1. Define the un-normalized probabilitydistribution:

P′(x|y)=P(x)e ^(L′(y|x))  (17)

Therefore, P(x|y) is given by:

$\begin{matrix}{{P\left( x \middle| y \right)} = \frac{P^{\prime}\left( x \middle| y \right)}{\sum\limits_{x}{P^{\prime}\left( x \middle| y \right)}}} & (18)\end{matrix}$

Here, signal y(n) is a sequence of real numbers. Therefore, this resultis directly applicable to the I or Q samples. In one embodiment, whenthe signal can be reliably demodulated, one need only use one of the twochannels (e.g., the I channel alone). However, if signal y(n) is asequence of complex numbers, i.e., when both I and Q channels aresampled (e.g., the signal of equation 2), the magnitudes of thecorrelation conv(y, s, x) and the gain γ are used:

$\begin{matrix}{{L^{\prime}\left( y \middle| x \right)} = {\sum\limits_{n = 0}^{N - 1}{L^{\prime}\left( {\left. {y(n)} \middle| {s\left( {n - x} \right)} \right. = {\frac{\gamma }{\sigma^{2}}{{{Conv}\left( {y,s,x} \right)}}}} \right.}}} & (19)\end{matrix}$

and

$\begin{matrix}{\frac{\gamma }{\sigma^{2}} = \frac{\sqrt{S\; N\; R}}{\sigma}} & (20)\end{matrix}$

If M samples are taken of each of N_(c) chips, the total number N ofsamples is N_(c)M. Using a straight-forward implementation of thecorrelation, with the search range of offset x given as N_(cx) chips,the total number C_(t) of accumulate-multiply steps required tocalculate conv(y,s,x) is:

C _(t) =m ² N _(c) N _(cx)  (21)

In one embodiment, the number of accumulate-multiply steps required maybe reduced significantly by dividing the probe signal into multiplesections and categorizing each section into one of a set of categories,and processing each section according to the assigned category. Thecategorization step may be performed in a pre-processing of the probesignal.

At run time, the samples of the demodulated signal are assigned tosections, guided by the center probe signal (i.e., signal s(n) describedabove). Each section is categorized to the same category as thecorresponding section of center probe signal s(n). The samples of thedemodulated signal are then accumulated in a set of accumulators A(k,m)based on category (k) and the sample index offset (m). The values in theaccumulators are then used to calculate a correlation for each offset xin the search range.

Under the categorization scheme, each section of a given category in anyshifted probe signal of relative offset x within search range R_(x) isindistinguishable from any other section of the same probe signalassigned to the same category. Search range R_(x) is referred to as the“allowed range”, or the “allowed offset range.” A signal that can becategorized to a finite number of categories is referred to as a“section-categorizable” signal. Binary signals are alwayssection-categorizable.

FIG. 6 illustrates dividing samples of demodulated signal 604 intosections, in accordance with one embodiment of the present invention.FIG. 6 also shows center probe signal 603. Section boundaries 601 areeach set at the mid-point of a corresponding chip in probe signal 603.Each section lasts one chip time (t_(c)). As shown in FIG. 6, eachsection is categorized according to the waveform of probe signal 603within the section. For example, the neighboring sections 602 arecategorized to categories ‘0’ and ‘1’. The categories of the remaindersections are similarly labeled. In the example of FIG. 6, category k ofeach section may be any one of four categories: (a) k=0, when all signalvalues within the section equal to the +1 level; (b) k=1, when thesignal values within the section transition once from the +1 level tothe −1 level; (c) k=2, when all signal values within the section equalthe −1 level; and (d) k=3, when the signal values within the sectiontransitions from the +1 level to the −1 level.

In FIG. 6, samples in a section of demodulated signal 604 areaccumulated in an accumulator corresponding to the category of theassigned section and each sample's sample offset value. Note that theGPS C/A code is a periodic signal that repeats itself after every ms,and modulated on another signal (“information bits”). The informationbits each have a period of about 20 ms.

FIG. 7 shows the waveforms of shifted probe signals 702, 703, 705 and706, and center probe signal 704, before, between and after sectionboundaries 701, in accordance of the present invention. Shifted probesignals 702, 703, 705 and 706 are obtained by offsetting the centerprobe signal 704 by relative offsets −½, −¼, ¼, and ½ chips,respectively (i.e., within the offset range of [t_(c)/2, t_(c)/2]). InFIG. 7, shifted probe signals 702, 703, 705 and 706 are also labeledS(n+2), S(n+1), S(n−1) and S(n−2), respectively. Center probe signal 704is labeled S(n). As the signal values of center probe signal 704transition only once from the +1 level to the −1 level between sectionboundaries 701, the section is assigned category k=1, according to thecategorization scheme described above. In FIG. 7, a sampling rate of 4samples per chip time may be used (i.e., ¼ chip between samples). Sincecenter probe signal s(n) does not have a transition within a half-chiptime outside of section boundaries 701, in each shifted probe signal,all sections that are categorized to the same category k=1 have the samewaveform within their respective section boundaries. That is, allsections of shifted probe signals 702, 702, 703 and 705 that arecategorized to k=1 have their respective waveforms between sectionboundaries the same as those shown within section boundaries 701. FIG. 7thus illustrate “single-T categorization,” as the offset range is aboutone chip-time long.

Categorization may be used to reduce the number of arithmetic operationsneeded for calculating the correlation of each relative offset x.Formally, the correlation between the received signal and a shiftedprobe signal of relative offset x is given by:

$\begin{matrix}{{{Conv}\left( {y,s,x} \right)} = {{\sum\limits_{n = 0}^{N - 1}{{y(n)}{s\left( {n - x} \right)}}} = {\sum\limits_{c}^{C - 1}{\sum\limits_{m = 0}^{M - 1}{{y\left( {{cM} + m} \right)}{s\left( {c,{m - x}} \right)}}}}}} & (22)\end{matrix}$

where c denotes a section index, C denotes the number of sections withinthe correlation period, m denotes a sample index for the m-th samplewithin a section, s(c, m−x) denotes the signal value for the m-th samplein section c of shifted probe signal s(n−x), x being the relativeoffset, and y(cM+m) denotes the m-th sample in section c of thedemodulated signal.

Let K be the total number of categories to which a section can becategorized. As discussed above, within each category k, the signalvalue s(c, m−x) is the same for all c<C, relative offset x being withinallowed range R_(x). Thus, signal value s(c, m−x) in a sectioncategorized to category k may be denoted s(k, m−x). Accordingly:

$\begin{matrix}{{{Conv}\left( {y,s,x} \right)} = {{\sum\limits_{c}^{C - 1}{\sum\limits_{m = 0}^{M - 1}{{y\left( {{cM} + m} \right)}{s\left( {c,{m - x}} \right)}}}} = {\sum\limits_{k = 0}^{K - 1}{\sum\limits_{m = 0}^{M - 1}{{s\left( {k,{m - x}} \right)}{\sum\limits_{c \in k}{y\left( {{cM} + m} \right)}}}}}}} & (23)\end{matrix}$

where c∈k denotes section c that is categorized to category k. Theaccumulation of the samples of the demodulated signal in section c,i.e., Σ_(c∈k)y(cM+m), may be performed using a set of accumulators. Let:

A(k,m)=Σ_(c∈k) y(cM+m)  (24)

denote the accumulated value in the accumulator for accumulating samplesof sections categorized to category k with section sample index m. Then,K×M accumulators are needed, one for each k and each sample offsetindex. FIG. 12 is a flow chart illustrating method 1200 for operating anaccumulator at run time, according to one embodiment of the resentinvention. As shown in FIG. 12, at step 1201, the beginning of a sectionis identified. At step 1202, the section category k is determined orlooked-up from a previously calculated table. Then, the M accumulatorsfor category k are identified. By iteratively performing steps1204-1208, the sample values y(cM), y(cM+1), y(c(2M−1)) are each addedto a corresponding accumulator. When all sample values in the sectionare accumulated, at step 1208, the process is repeated for the nextsection, until the sample values of all sections of the demodulatedsignal needed for the current set of correlations have been accumulated(step 1209). Thus, if each correlation involves N samples of thedemodulated signal, the total number of accumulate operations equalN=MAT_(c) (note that there is no multiplication performed for theportion of Equation 23):

C _(a) =MN _(c)  (25)

At step 1210, for each relative offset x, the correlation Conv(y, s, x)is calculated using the values in the accumulators:

$\begin{matrix}{{{Conv}\left( {y,s,x} \right)} = {{\sum\limits_{k = 0}^{K - 1}{\sum\limits_{m = 0}^{M - 1}{{s\left( {k,{m - x}} \right)}{A\left( {k,m} \right)}}}} = {\sum\limits_{k = 0}^{K - 1}{{conv}\left( {{s(k)},{A(k)},x} \right)}}}} & (26)\end{matrix}$

Equation 26 shows that each correlation of length N is transformed intothe sum of K correlations, each of M samples and MN_(cx) offsets. Ingeneral, Equation 26 requires:

C _(sum) =KM ² N  (27)

accumulate-multiply operations and

C _(sa) =KMN _(cx)  (28)

additions. Accordingly, under the method of FIG. 12, the total number ofarithmetic operations required for all relative offsets is much reduced:

C _(total) =C _(a) +C _(sum) +C _(sa) ≅MN _(c) +KM ² N _(cx)  (29)

There are numerous ways to implement the accumulators. In oneembodiment, the accumulator operations are performed by a generalpurpose processor (e.g., a central processing unit, or CPU), or sharedaccumulator hardware. In that embodiment, the accumulated results (andstates) of the accumulators are stored in different memory locations inthe memory system. In another embodiment, the accumulators areimplemented as hardware accumulators and the values to be accumulated bysuch accumulators are sent to them by the system. In other embodiments,one can use a combination of any of these approaches.

The above method can be applied to any signal that issection-categorizable. In the example of FIG. 6, the section length isselected to be the chip time. However, one may select another sectionlength, which likely leads to a greater total number of categories (K).For a binary signal, such as a GPS/GNSS signal, there are additionalways to further reduce the required arithmetic operations. Even with thesection length selected to be the chip time, one can reduce the requiredarithmetic operations by applying a mask signal to both the samples andthe center probe signal. The mask signal, denoted m_(s)(n), may have auniform signal value (+1 level or −1 level) for each section. In otherwords,

m _(s)(n)=m _(s)(cM+m)=s(cM) for all m<M and c<C  (30)

Note that m_(s)(n)m_(s)(n)=1. One may also use other mask signals. Forexample, one may select the uniform signal value for each section of themask signal to be the signal value of the center probe signal at thelate boundary of the section. Since m_(s)(n)m_(s)(n)=1,

$\begin{matrix}{{{Conv}\left( {y,s,x} \right)} = {{\sum\limits_{n = 0}^{N - 1}{\left( {{y(n)}{m_{s}(n)}} \right)\left( {{m_{s}(n)}{S\left( {n - x} \right)}} \right)}} = {\sum\limits_{n = 0}^{N - 1}{{y_{m}(n)}{s_{m}\left( {n - x} \right)}}}}} & (31)\end{matrix}$

where y_(m)(n)=y(n)m_(s)(n) is the masked sample signal ands_(m)(n−x)=m_(s)(n)s(n−x) is the masked shifted probe signal.

FIG. 8 illustrates masked probe signal s_(m)(n), according to oneembodiment of the present invention. As shown in FIG. 8, probe signal801 (i.e., probe signal s(n)) is used to construct mask signal 804which, in turn, provides masked probe signal 804 (i.e., masked probesignal s_(m)(n)) shows the masked probe signal s_(m). Each section ofthe masked signal 805 may be assigned to one of two categories: k=1,which has a transition within the section, or k=0, which does not have atransition within the section. Mask signal 804 transforms both a −1level to +1 level transition and a +1 level to −1 level transition inprobe signal 801 to a +1 level to −1 level transition in masked probesignal 805. Mask signal 804 also transforms a section with a uniform+1level signal value or a uniform −1 level signal value to a uniform +1signal level. The value of the masked sample signaly_(m)(n)=y(n)m_(s)(n) may be calculated before the resulting sample isaccumulated in the corresponding accumulator, while masked probe signals_(m)(n) may be pre-computed. The technique of masking is referred to inthis detailed description as the “masking technology.” Since the numberof categories is reduced by one-half in this example, the resultingcircuit has a lesser footprint. In a software implementation, the numberof arithmetic operations required in computing the correlations is alsocorrespondingly reduced.

Other ways to categorize sections of a probe signal are described next,which allow correlations of larger offset ranges to be more efficientlycalculated. For example, in one embodiment, the chip boundaries are usedas section boundaries. The masking technology illustrated by Equations30 and 31 may be applied to both the probe signal and the sample signal(i.e., the demodulated received signal). The sections of the maskedcenter probe signal may be categorized by whether or not there is asignal value transition within the previous and the following chips. Asthere are 4 possible categories, the categories are denoted using 2-bitvalues. When there is a transition in the previous chip, the first bitof the 2-bit category is assigned a ‘1’; otherwise, it is assigned a‘0’. Similarly, when there is a transition in the following chip, thesecond bit of the 2-bit category is assigned a ‘1’; otherwise it isassigned a ‘0’. FIG. 9 illustrates this categorization scheme for centerprobe signal 903, in accordance with one embodiment of the presentinvention. As shown in FIG. 9, the section boundaries are labeled 901.The categories of the sections are provided, as indicated by referencenumeral 902. This categorization scheme provides an allowed offset rangeof [t_(c), t_(c)], which is twice as large as that of the single-Tcategorization scheme illustrated by FIG. 6.

Similar techniques allow even greater offset ranges. In general, onemay:

1. use chip boundaries as section boundaries;

2. mask both the probe signal and the sample in the manner illustratedby Equations 30 and 31; and

3. categorize the sections using values in C previous chips and Cfollowing chips.

Under this method, the category may be encoded by a 2C_(n)-bit binarynumber, with each bit corresponding to whether or not the signal valuein the current section is equal to the signal value in the correspondingone of chips at relative offsets −C_(n), −1, 1 . . . , C_(n). If asignal value within a chip is the same as the signal value in thecurrent section, the corresponding bit in the category value is ‘0’;otherwise, the corresponding bit in the category value is assigned ‘1’.As a result, the category value can be any of 2^(2C) ^(n) values, andthe allowed offset range is [−C_(n)t_(c), C_(n)t_(c)].

One can also extend the allowed offset range for calculatingcorrelation, if one sets the section boundaries at the mid-points ofchips, such as shown in FIG. 6:

1. use mid-points of the chips as section boundaries;

2. mask both the probe signal and the sample in the manner illustratedby Equations 30 and 31; and

3. categorize each section using a category value that encodes whetheror not there is a transition in the current section and each of C_(n)previous sections and C_(n) following sections.

Under this method, the category value is a 2C_(n)+1-bit binary number.The value of each bit corresponds to a section having one of therelative offsets: −C_(n), −1, 0, 1 . . . , C_(n). If there is transitionwithin the corresponding section, the corresponding bit is assigned a‘1’; otherwise, the corresponding bit is assigned a ‘0’. The allowedoffset range under this method is [−(C_(n)+½)t_(c), (C_(n)+½)t_(c)], andthe category value may be any of 2^(2Cn+1) values. FIG. 10 illustratesthis method for the case C_(n)=1, according to one embodiment of thepresent invention. In FIG. 10, section boundaries 1001 are selected tobe mid-points of the chips in probe signal 1003. As category 1002 valueencodes whether or not the previous, current or following chip includesa signal transition, there are 8 categories.

For binary probe signals, the number of arithmetic operations in acorrelation calculation for a given relative offset x may be furtherreduced. For example, consider two functions v and u, where u havebinary values (i.e. the value of u(i) is either 1 or −1), similar to theprobe signals discussed above. Then the correlation of signals u, v fora relative offset of x is given by:

$\begin{matrix}{{{Conv}\left( {u,v,x} \right)} = {\sum\limits_{i = 0}^{I - 1}{{u\left( {i - x} \right)}{v(i)}}}} & (32) \\\begin{matrix}{{{Conv}\left( {u,v,{x + 1}} \right)} = {{\sum\limits_{i = 0}^{I - 1}{\left( {{u\left( {i - x - 1} \right)} - {u\left( {i - x} \right)}} \right){v(i)}}} +}} \\{{{u\left( {i - x} \right)}{v(i)}}} \\{= {{{Conv}\left( {u,v,x} \right)} + {\sum\limits_{i = 0}^{I - 1}\left( {{u\left( {i - x - 1} \right)} -} \right.}}} \\{\left. {u\left( {i - x} \right)} \right){v(i)}}\end{matrix} & (33)\end{matrix}$

Because a probe signal of the type we discussed above are binary-valued,and multiple samples are taken at every chip, the value of the termu(i−x−1) u(i−x) is often zero. Hence,Conv(u, v, x) may be calculated recursively in the following manner:

Step 1: calculate Conv(u, v, 0);

Step 2: initialize x=0;

Step 3: calculate

$\sum\limits_{i = 0}^{I - 1}{\left( {{u\left( {i - x - 1} \right)} - {u\left( {i - x} \right)}} \right){v(i)}}$

Step 4: calculate Conv(u,v,x) using Equation (33) and the result of step3; and

Step 5: increment x by 1 and repeat Steps 3-5 until all values of x havebeen computed.

For example, when v(n) if a +1 level to −1 level transition function ina section of center probe signal s(n):

v(n)=1, for n<0

−1, for n≥0   (34)

Then,

$\begin{matrix}{{\sum\limits_{i = 0}^{I - 1}{\left( {{u\left( {i - x - 1} \right)} - {u\left( {i - x} \right)}} \right){v(i)}}} = {2\; {v(n)}}} & (35)\end{matrix}$

Consequently, the correlation may be calculated by order M steps, usingorder M additions, order M subtractions and order M multiple-by-2operations, rather than the order M² multiplications and additionsrequired for a conventional calculation.

The powers of the signal and the noise of the received signal may beestimated using the correlation results. For a general digital signalh(n), its power of the signal is defined as |h(n)|². Therefore, thepower of signal y(n), represented by N samples, is given by:

$\begin{matrix}{P_{y} = {\frac{1}{N}{\sum\limits_{n = 0}^{N - 1}{{y(n)}}^{2}}}} & (37)\end{matrix}$

Let x_(max) to denote the relative offset that yields the maximumcorrelation magnitude C_(max), i.e.,

C _(max)=Conv(y,s,x _(max))  (38)

The expected value of the gain, E[γ], is given by:

$\begin{matrix}{{E\lbrack\gamma\rbrack} = \frac{C_{\max}}{N}} & (39)\end{matrix}$

The power of the signal, P_(s), can be obtained using the maximumcorrelation value:

$\begin{matrix}{P_{s} = {{{E\lbrack\gamma\rbrack}}^{2} = \frac{{C_{\max}}^{2}}{N^{2}}}} & (40)\end{matrix}$

The signal-to-noise ratio can be calculated using:

$\begin{matrix}{{S\; N\; R} = \frac{P_{s}}{P_{y} - P_{s}}} & (41)\end{matrix}$

In a GPS/GNSS system, P_(y)>>P_(S), so that:

$\begin{matrix}{{S\; N\; R} \cong \frac{P_{s}}{P_{y}}} & (42)\end{matrix}$

The standard deviation a of additive noise ε (approximated by a Gaussiandistribution) can be estimated using:

$\begin{matrix}{\sigma = \sqrt{P_{y}}} & (43)\end{matrix}$

When both the signal-to-noise ratio SNR and signal power P_(y) (orstandard deviation σ) are known, the expected magnitude of the maximumcorrelation value C_(max) is given by:

$\begin{matrix}{{{E\left\lbrack {C_{\max}} \right\rbrack} \cong {N{{E\lbrack\gamma\rbrack}}}} = {{N\; \sigma \sqrt{S\; N\; R}} = {N\sqrt{\left( {S\; N\; R} \right)P_{y}^{2}}}}} & (44)\end{matrix}$

where N is the number of the samples in the correlation calculation. Theexpected magnitude of maximum correlation value E[|C_(max)|] can be usedto detect if the offset x is within the search range (i.e., the estimateof offset x is successful). If the measured maximum correlation valueC_(max) is too small:

|C _(max)|<α_(cmax) E[|C _(max)|]  (45)

where α_(cmax) is a design parameter, then the relative offset x islikely out of range. In some embodiments, one may choose α_(cmax)=10.

In some embodiments, one or more samples may be skipped (i.e., notaccumulated in the accumulators). In one embodiment, for an offsetsearch range of [t_(c)/2, t_(c)/2], using single-T categorization andmasking as discussed above, the contribution of a sample in anon-transition section (i.e., category 0) to each correlation is thesame, regardless of the relative offset. Hence, contributions by“category 0” sections do not change the relative likelihood for anyrelative offset x. Thus, such sections do not affect the end resultafter normalization. Thus, accumulation of samples in category 0sections may be skipped.

In each section, the relative offset x of the samples in the section isdefined with respective of center probe signal s(n). The originalsample's index is represented by n=cM+m, where c is the section numberand m is sample section index. Within a given section, if center probesignal s(n) has a transition just between sample index

$m = {\frac{M}{2} - 1}$

and sample index

${m = \frac{M}{2}},$

sample index

$m = {\frac{M}{2} - 1}$

is the time point defined to have a relative offset x=0 Therefore, s(cM+m) has a relative offset

$x = {m - \frac{M}{2} + 1.}$

In one embodiment, M is chosen to be an even number. In otherembodiments, where M is an odd number, one can use floor(M/2) instead ofM/2 to be the time point with zero relative offset.

The total number of arithmetic operations may be further reduced, takingadvantage of the probability distribution of offset x. For example,taking into account samples that have been taken and processed, offset xis more likely to be within a smaller range of relative offsets. In oneembodiment, calculations involving samples that are unlikely tocorrespond to a rapidly changing portion of the probe signal can beskipped. The rapidly changing part of a binary probe signal is the partthat is close in time to where a transition from +1 level to −1 level,or from level −1 to level+1, occurs. The samples that are unlikely tocorrespond to a rapidly changing part of the probe signal are likely tocorrespond to an unchanging part of the probe signal. Thus, thesesamples are unlikely to contribute to a measure that distinguishesbetween the likelihood of different offsets, and thus may be skipped(i.e., need not be accumulated in the corresponding accumulators).

In category 1 sections (i.e., sections in which a transition occurs inthe corresponding probe signal) under single-T categorization andmasking, the probability that a transition happens just after the sampleat relative offset x equals the probability that the received signal hasrelative offset x. Hence, one can use the probability of the relativeoffset to determine which samples may be skipped. If the probability ofrelative offset x is smaller than a certain threshold, the calculationscorresponding to relative offset x may be skipped.

Other probabilities may also be used to determine which samples insections that are not likely to have a transition may be skipped. Forexample, in one embodiment, an average of probabilities P(n−1) and P(n)can be used to determine if the sample at relative offset n may beskipped:

$\begin{matrix}{{P_{2}(n)} = {\frac{1}{2}\left\lbrack {{P(n)} + {P\left( {n - 1} \right)}} \right\rbrack}} & (46)\end{matrix}$

This is because, when n is out of the search range for relative offsetx, P(n)=0. Average probability P₂(n) should be normalized, if needed.Another way to determine to skip is to use a cumulative probability:

$\begin{matrix}{{P_{c}(n)} = {\sum\limits_{i = 0}^{n}{P(i)}}} & (47)\end{matrix}$

Under this scheme (“probability threshold scheme”), one may select avalue P_(C0), and skip the samples at certain relative offsets c whenP_(c)<P_(C0) or 1—P_(c)<P_(c0). In some embodiments, P_(c0) may bechosen to have a value between 0.1 and 0.3, for example. Alternatively,P_(c0) may be adjusted empirically or determined by a simulation.

FIG. 11 shows how, using the probability threshold scheme, theprobability distribution of relative offset x evolves in time forcategory 1 sections under single-T categorization and masking (i.e.,sections in which a transition occurs in the corresponding probesignal), in accordance with the present invention. In FIG. 11,accumulations of samples in unchanging sections have been skipped.Initially, illustrated by probability distribution 1101, the probabilitydistribution for relative offset x is assumed to be uniform.

The probability distribution for relative offset x evolves in time asillustrated in order by probability distributions 1101, 1102, 1103,1104, 1105, 1106, 1107, and 1108. Each bar (e.g., bar 1110) provides theprobability value corresponding to a relative offset value (e.g.,relative offset value 1112). Line 1111 represents the thresholdprobability value. If the probability for relative offset x is less thanthe threshold probability value, samples corresponding to that relativeoffset are skipped.

New samples are taken and added to accumulators A(k,m) continuously. Theaccumulators are not reset between iterations. A correlation iscalculated in between two iterations (e.g., iterations of steps 1201 to1209, for the method illustrated in FIG. 12) in order to calculate aprobability distribution. In some embodiments, the accumulators may beadjusted for the time passed before a correlation is calculated (theprobability distribution is thereby adjusted as well).

Probability distribution 1102 results after some samples of thedemodulated received signal have been taken and processed. Theprobabilities of relative offsets −3 and 4 are found less than threshold1111. Hence, samples of the demodulated signal at relative offsets −3and 4 are skipped in the next iteration, leading to probabilitydistribution 1103. At this point, the probabilities of relative offsets−3, −2, 3, and 4 fall below probability threshold value 1111 and thussamples at these relative offsets are skipped in the next iteration.Additionally, samples at relative offsets −1 and 2 are skipped in thefollowing iterations based on probability distribution 1104 and 1105.

During this process, although samples at certain relative offsets areskipped, the correlations of all relative offsets inside the searchrange are still calculated. The skipped samples are not accumulated,which is equivalent to having a zero signal value). Thus, theprobability of any relative offset may still change (and may sometimeseven become larger). For example, even though samples corresponding torelative offset −1 are not accumulated immediately after probabilitydistribution 1104 is presented, the probability of relative offset −1 ina subsequent probability distribution (i.e., probability distribution1106), the probability for relative offset −1 actually increased. In theiteration after probability distribution 1106 is presented, accumulationof samples at relative offset −1 resumes. By keeping track of theprobabilities for all (or at least some) relative offsets in the searchrange whether or not samples are accumulated for some of the relativeoffsets within the range, the resulting method is robust to statisticalfluctuations.

Often, a single relative offset remains that exceeds threshold 1111,such as shown for relative offset 0 in probability distribution 1107. Inone embodiment of the invention, the sampling and the probabilityupdates are kept running after that event, such as illustrated byprobability distribution 1108, which results after one or moreiterations following probability distribution 1107.

The number of samples that is accumulated before each probabilitydistribution (or other statistical states) is computed need not befixed. Selecting an appropriate value at any given time is a trade-offbetween avoiding accumulating samples that should be skipped andavoiding computing probability updates too often. The optimal valueminimizes the overall amount of computation, which results in reducedpower consumption.

Sample-skipping may be implemented in any of a number of differentstages in the system. For example, in one embodiment, the signal samplesthat are skipped are received into the analog-digital converter (ADC).In another embodiment, the signal samples are received into the ADC, butthe converted digital samples are not saved into memory. In anotherembodiment, the samples are saved in memory but are not provided to theaccumulators.

Signal samples maybe buffered by the system. In one embodiment, eachsample is processed directly after it is received into the ADC. Inanother embodiment, after digitization in the ADC, the samples may bebuffered in memory for processing at a later time.

Sample-skipping is based on the principle that one can avoid taking orusing samples that have such a low probability of contributing to aprobability distribution as to affect differentiating among thehigh-probability possible offsets of the signal. This result can beachieved in many in different ways. In some embodiments, one can achievethe same or similar results by adjusting the sampling frequency:

1, taking samples at a lower initial sampling rate;

2. calculating a probability distribution of the possible offsets;

3. when a range of offsets have probabilities that are significantlyless than the others, those low-probability offsets are marked to beskipped;

4. when the remaining offset range (i.e., the range of offsetscorresponding to samples that are not skipped) is small enough (e.g.,less than a half of the previous range), increasing the sample frequency(e.g., by a factor of 2); and

5. repeating steps 2-5 until the desired offset resolution is archived.

The value in the accumulator for the samples at the correspondingrelative offset may be used to provide a finer estimate for the relativeoffset, e.g., an estimate with a resolution finer than the samplingtime.

In one embodiment, the system keeps track of the number of samplesN_(s)(k, x) that are added into the accumulator, where k is the categoryand x is the relative offset. The relative offset translates into thesample index by the relation m=x+M/2−1. (The accumulator value can alsobe looked up A(k, x), using this relation.)

Denote a sub-sample portion of the relative offset to be x_(s). When atransition occurs just after the sample at relative offset x, i.e.x_(s)=0, the expected value of the accumulator (denoted as A(1, x),where 1 denotes the category that has a signal transition)

$\begin{matrix}{\overset{\_}{A} = {{N_{s}\left( {1,x} \right)}\sqrt{({SNR})p_{y}}}} & (49)\end{matrix}$

where p_(y) is the average power of the demodulated signal and where SNRis the signal-to-noise ratio of the demodulated signal. When thetransition occurs just before the sample, i.e. x_(s)≈−1, the expectedaccumulated value in the accumulator is A. The fractional relativeoffset x_(s) of the sample can be calculated by interpolating betweenthe cases.

$\begin{matrix}{x_{s} = {\frac{A\left( {1,x} \right)}{2\overset{\_}{A}} - \frac{1}{2}}} & (50)\end{matrix}$

Note that A(1, x) in equation 50 represents accumulation of the samplesof the demodulated received signal. Thus, A(1, x) is presumably a realnumber. Any imaginary part can be disregarded in equation 50. Theoverall estimate of the relative offset x_(a) is given by:

x _(a)(x)=x+x _(s)(x)  (51)

When there are more than one estimated relative offset, the overalloffset x may be estimated by a weighted sum of the x_(a)(x):

$\begin{matrix}{\overset{\_}{x} = {\sum\limits_{x}{{P(x)}{x_{a}(x)}}}} & (52)\end{matrix}$

where P(x) is the probability of relative offset x. In some embodimentthe summation is over all x in the search range. In other embodiments,the summation can be over only the relative offsets that has probabilitylarger than the probability threshold. Equation 52 provides a betterestimation of the offset than the expected value of the probabilitydistribution. However, when the probability is widely distributed overthe search range, Equation 52 may not be effective. Hence, a simpleexpected value method may be more appropriate in some embodiments.

The system may change over the time samples are taken and processed. Forexample, the user's location may change, the local clock may drift, orother conditions may change. In some embodiments, such changes may besignificant. One way to handle such changes is to update the probabilitydistributions over time, such as to let the correlation values (or,equivalently, the log likelihood) fade away over time:

$\begin{matrix}{{{conv}_{t}\left( {y,s,x} \right)} = {e^{- \frac{t}{\tau}}{{conv}_{0}\left( {y,s,x} \right)}}} & (53)\end{matrix}$

where conv₀(y, s, x) is the correlation value at an initial time pointand coun_(t) (y, s, x) is the correlation value after a time interval τ(i.e., the fading time). Variable τ may be seen as a design parameterthat depends on the dynamics of the object being measured. Roughly, asample that is taken more than a predetermined time r prior to thecurrent time should not contribute significantly to the currentcorrelation value. For example, in one embodiment, for an object movingat a speed of about 30 meters per second, variable τ may be set to onesecond. Variable τ may also be adjusted empirically or determined bysimulation.

As new samples are taken, the correlation calculated using the newsamples may be added to the then existing correlation values. Therefore,the accumulator values can also be faded:

$\begin{matrix}{{A_{t}\left( {k,x} \right)} = {e^{- \frac{t}{\tau}}{A_{0}\left( {k,x} \right)}}} & (54)\end{matrix}$

The un-normalized log likelihood may also be similarly faded:

$\begin{matrix}{L_{t} = {e^{- \frac{t}{\tau}}L_{0}}} & (55)\end{matrix}$

Many of the specific embodiments discussed in this detailed descriptionare selected for notation convenience. Many variations may be used toachieve the same results, For example, in one embodiment, one may usethe following procedure:

1. take samples around the tranistions of the signal;

2. adjust the sign of the samples taken according the direction ofsignal transition (i.e., from level+1 to level −1 or from level −1 tolevel+1);

3. calculate the correlations by first grouping the samples.

This procedure is equivalent to the masking-categorization (with k=1)procedure described above in conjunction with FIG. 8.

Note that different components of this invention can be selected to useor not use in different embodiments of this invention. For example, inone embodiment, one can chose to only use the skipping method to reducethe total amount of calculation. One can take samples that are expectedto be close to the jumps of the signal and skip the samples that areexpected to be far away from the jumps. Then, one can use thetraditional method of calculate correlation based on those signals. Inthat embodiment, the categorization component is not used, however,total mount of calculation/power is still reduced comparing to themethods without skipping.

Numerical oscillator 203 of FIG. 2 may operate based on estimations ofthe phase and the frequency f of the IF carrier signal from RF front end201. One implementation of NCO 203 may provide both in-phase andquadrature signals:

N _(I)(n)=cos(ϕ+2nπft _(s))

N _(Q)(n)=sin(ϕ+2 nπft _(s))   (56)

In some embodiments, one can simply use binary signals rather than sinand cos signals:

N _(I)(n)=sign(cos(ϕ+2nπft _(s)))

N _(Q)(n)=sign(sin(ϕ+2nπft _(s)))   (57)

Where sign(⋅) is the sign function:

sign(x)=1, for x<0

−1, for x≥0   (58)

To avoid costly floating-point calculations, angular rate ω2πft_(s) andphase ϕ may both be represented as integers. The sign(cos(x)) and thesign(sin(x)) can be calculated using the total phase at sample n, whichis given by: ϕ_(n)=ϕ+ωn.

The RF front end (e.g., RF Front end 102 of FIG. 1) removes most of thefrequency modulation from the received signal. Any remaining frequencymodulation may be removed by a channel-specific demodulator, which isachieved using:

I _(O)in)=I _(i)(n)N _(I)(n)−Q _(i)(n)N _(Q)(n)

Q _(O)(n)=I _(i)(n)N _(Q)(n)+Q _(i)(n)N _(i)(n)   (59)

where I_(O)(n) and Q_(O)(n) are the output data samples, and I_(i)(n)and Q_(i)(n) are the data samples.

In some embodiments, frequency and phase estimations can be done usingconventional frequency and phase tracking loops. To reduce the amount ofcalculations and the power consumption, the following or a similarmethod may be used.

Coarse estimation (or signal acquisition) provides an initial estimationof the frequency modulation. Initially, the phase and the frequency ofNCO 203 may be set to zero or any other convenient initial value. Then,samples may be taken for the signal acquisition calculations. Aftersignal acquisition, the frequency and phase of NCO 203 may be set toinitial values:

f=f ₀;ϕ=0  (60)

where f₀ is the frequency estimation from the signal acquisition. Next,one way to estimate the phase is to take some samples during a timeinterval T_(c) and calculate a number of correlations over the searchrange determined by the signal acquisition step. The phase ϕ_(m) of thecorrelation with the maximum absolute value, C_(max), provides anestimation of the average remaining phase during the time intervalT_(c).

ϕ_(m)=phase(C _(max))  (61)

In a preferred embodiment of the invention, T_(c) is chosen using thefollowing criteria:

1. T_(c) should be short enough so that phase change δϕ during the timeperiod is small. For example, one criterion for T_(c) may be:

$\begin{matrix}{T_{c} < \frac{{\delta\varphi}_{1}}{2{\pi\delta}\; f}} & (62)\end{matrix}$

-   -   where δf is the frequency resolution and δϕ₁ is a selected phase        error. The phase change δϕ of the received signal over selected        interval T_(c) will be less than δϕ₁. In some embodiments δϕ₁        can be chosen between π/6 and ϕ/2.

2. T_(c) should be chosen large enough so that enough samples may betaken for making a reliable phase measurement. For example, onecriterion for T_(c) may be:

$\begin{matrix}{T_{c} > \frac{\left( {\delta\varphi}_{2} \right)^{2}t_{s}}{SNR}} & (63)\end{matrix}$

In some embodiment the phase error δϕ₂ may be a value selected betweenπ/6 and π/4.

The frequency can be estimated by performing two phase estimationsseparated by time interval T_(m). T_(m) may be selected to be as long aspossible, but is kept short enough so that the phase change during theperiod should be less than 2π, so as to avoid phase skipping. That is,

T _(m) δf2π<2π  (64)

where δf is the accuracy of the frequency estimation before the phasemeasurements. This implies:

$\begin{matrix}{T_{m} < \frac{1}{\delta \; f}} & (65)\end{matrix}$

In some embodiment, a safety margin may be applied (e.g., T_(m)=0.3/δf).

Denote the results of a first and second phase measurements ϕ_(n1) andϕ_(n2) and their accuracies (i.e., resolutions) δϕ₁ and δϕ₂,respectively. The measured frequency may be obtained by:

$\begin{matrix}{f_{m} = \frac{\varphi_{m\; 2} - \varphi_{m\; 1}}{T_{m}}} & \left( 66 \right.\end{matrix}$

The accuracy of frequency, δf after the two measurements is given by:

$\begin{matrix}{{\delta \; f} = \frac{\sqrt{{\delta\varphi}_{1}^{2} + {\delta\varphi}_{2}^{2}}}{T_{m}}} & (67)\end{matrix}$

After the measurements, the phase and the frequency of the numericaloscillator may be updated using the following relations:

ϕ₊=ϕ⁻−ϕ_(m2)

f ₊ =f ⁻ −f _(m)   (68, 69)

where ϕ_(·) and f_(·) are the phase and frequency of the NCO before theupdate and ϕ₊ and f₊ are the phase and frequency of the NCO after theupdate, respectively.

In one embodiment, this two-step phase-frequency update is run each timeprior to performing a fine offset estimation. In some other embodiment,this two-step phase-frequency update is run multiple times recursivelyuntil a certain frequency accuracy level is achieved. For example,recursive updates may run until δf<10 Hz.

In one embodiment of the invention, a Kalman filter can be used toestimate the phase and frequency. This is a more robust and accuratemethod than the two-step phase-frequency method, at the expense ofgreater computation (i.e., greater power).

The state variables for the Kalman filter may be phase and frequency:

$\begin{matrix}{X = \begin{bmatrix}\varphi \\f\end{bmatrix}} & (70)\end{matrix}$

The state update matrix A may be modeled as:

$\begin{matrix}{A = \begin{bmatrix}1 & {2\pi \; t_{m}} \\0 & 1\end{bmatrix}} & (71)\end{matrix}$

The process noise may be modeled by:

$\begin{matrix}{w = \begin{bmatrix}w_{\varphi} \\w_{f}\end{bmatrix}} & (72)\end{matrix}$

where w_(ϕ) and w_(f) denote the process phase noise and frequencynoise, respectively. These noises are introduced by the local clockoscillator and user movement. The state update function is thus:

X _(n+1) =AX _(n) +w   (73)

The variance of w may be determined by the specification of theoscillator and the dynamics of the application. In one embodiment, thevariances of the process error may be modeled as being proportional tothe time passed:

σ_(ϕ) ² =P _(ϕ) t _(m)

σ_(f) ² =P _(r) t _(m)   (74)

where P_(ϕ) and P_(f) are the power of the phase random-walk noise andthe power of the frequency random-walk noise, respectively. Both thephase random-walk noise and the frequency random-walk noise may be acombination of a clock phase or frequency random-walk noise and a phaseor frequency random-walk noise due to the receiver's random motion. Inpractice, P_(ϕ) and P_(f) can be estimated from the clock specificationand the dynamics of the receiver. These parameters may also be adjustedempirically or by simulation until acceptable performance is reached. Inanother embodiment, the variances, as functions of time t_(m), may beestimated by measuring the Allan Variance of the local clock, andconsidering the receiver's dynamics.The process error covariance matrix is

$\begin{matrix}{\Sigma_{w} = \begin{bmatrix}\sigma_{\varphi}^{2} & 0 \\0 & \sigma_{f}^{2}\end{bmatrix}} & (75)\end{matrix}$

Denote the measurement of the remaining phase as ϕ_(m) which can beobtained using Equation 61 above. Alternatively, if the remaining phaseis small and the noise level is high, may be obtained using:

$\begin{matrix}{\varphi_{m} = {{phase}\left( \frac{{imag}\left( C_{\max} \right)}{E\left\lbrack {C_{\max}} \right\rbrack} \right)}} & (76)\end{matrix}$

where imag(⋅) is the function that extracts the imaginary part of acomplex number. E[|C_(max)|] denotes the expected value of the magnitudeof C_(max). The measurement Y is given by:

Y=CX+u   (77)

where u denotes the measurement noise and C denotes the output matrix:

C=[1 0]   (79)

The variance σ_(u) ² of u, which is a design parameter, is given by:

$\begin{matrix}{\sigma_{u}^{2} = \frac{t_{c}{SNR}}{t_{s}}} & (78)\end{matrix}$

The measurement y(n) is calculated using:

y(n)=ϕ_(m)+ϕ(n)   (80)

The covariance of the measurement is:

Σ_(u)=[σ_(u) ²]   (81)

The Kalman filter maintains an estimation of X and its covariance matrixΣ_(u) base on parameters A, C, Σ_(w), Σ_(u), measurements y and the timeof the measurements. The Kalman filter's time update and measurementupdate can be performed using the conventional Kalman filter constructs:

1. Time update:

X _(n+1) =AX _(n)

Σ_(X) _(n+1) =AΣ _(X) _(n) A ^(T)+Σ_(w)   (82,83)

2. Measurement update:

X _(n) ⁺ =X _(n) ⁻+Σ_(X) _(n) ⁻ C ^(T)(CΣ _(X) _(n) ⁻ C ^(T)+Σ_(u))⁻¹(y_(n) −CX)

Σ_(X) _(m) ⁺=Σ_(X) _(n) ⁻+Σ_(X) _(n) ⁻ C ^(T)(CΣ _(X) _(n) ⁻ C^(T)+Σ_(u))⁻¹ CΣ _(X) _(n) ⁻   (84,85)

where X_(n) ⁻ and X_(n) ⁺ denote the state variable before and after themeasurement update, Σ_(X) _(n) ⁻ and Σ_(X) _(n) ⁺ denote the statecovariance matrices before and after the update. Also note thaty_(n)−CX=ϕ_(n) in equation 85.The Kalman filter's covariance matrix Σ_(X) offers a good estimate ofthe frequency error or accuracy δf, which may be used to determine thetime interval T_(m) between measurements:

$\begin{matrix}{T_{m} < \frac{1}{\delta \; f}} & (86)\end{matrix}$

or with a safety factor a_(s)<1.

$\begin{matrix}{T_{m} < \frac{\alpha_{s}}{\delta \; f}} & (87)\end{matrix}$

In one embodiment a_(s)=0.3, so as to avoid phase wrapping or skippingand phase accuracy may be maintained. The duration of correlation timet_(c) can be similarly determine, using the two-step phase-frequencymethod described above.

In one embodiment of the invention, the behavior of the phase-frequencyKalman filter is coupled with status of the offset measurement:

-   -   1. choose the number of samples needed for correlation at the        current SNR, such that the signal-to-noise ratio SNR of the        correlation result satisfies the following equation with design        parameter α_(c)≅1.

$\begin{matrix}{N = {\alpha_{c}\frac{1}{SNR}}} & (88)\end{matrix}$

-   -   Design parameter ac may be chosen empirically or by simulation.        For example, in one embodiment, α_(c)=0.5.    -   2. determine the correlation time t_(c), taking into        consideration the number of skipped samples, so that N samples        are expected to be taken during t_(c):

$t_{c} = {2t_{s}N\frac{M}{M - M_{s}}}$

-   -   where M_(s) is the number of samples that are skipped in each        section that contains a signal transition (i.e., in each        category 1 section). The factor 2 results from the fact that        about half of the sections are non-changing sections (i.e.,        category 0 sections).    -   3, adjust the correlation time.        -   Calculate the phase error during next correlation time            t_(c), using

δϕ=2πδft _(c)   (90)

-   -   If the phase error δϕ is larger than a predetermined threshold        ϕ_(α), the correlation time is reduced to reduce the phase        error:

$\begin{matrix}{t_{c\; 0} = \frac{\varphi_{\alpha}}{2{\pi\delta}\; f}} & (91)\end{matrix}$

-   -   t_(c0) is the “phase stable” time. In one embodiment one can        select ϕ_(α) to be π/4. If t_(c)<t_(c0), one may use t_(c0) as        t_(c). If t_(c0) is longer than a certain threshold, one may        skip a phase-frequency update. For example, the predetermined        threshold may be α_(tc)t_(c), where α_(tc) is a design        parameter, with a typical value greater than 2.    -   4. determine if samples should be skipped based on a previous        estimate of the probability distribution, and whether or not a        phase-frequency update is necessary. If the phase-update is        necessary, the samples are not skipped.    -   5, calculate the correlations, and update the SNR, the offset        measurement, and the phase-frequency Kalman filter.    -   6. If the accuracy of the offset does not reach the        predetermined value, repeat from step 1; otherwise, output the        offset and keep the system in sleep or idle mode until next time        when the next offset estimate is required. For example, when the        system is required to have an offset output rate of 1 Hz, the        system may go into sleep mode for a timer period equal to 1        second minus the time required to obtain an offset estimate with        the required accuracy. That time required may be estimated based        the time taken for the last offset estimate.    -   7. After “waking up” from the sleep mode, update the offset        probability distribution and the Kalman filter according to the        time passed. Then, repeat from step 1.

Putting a system into a sleep mode in which minimal energy isused—reduces the overall energy cost.

Sample skipping may be realized not just at the accumulators describedabove. For example, if a sample need not participate in any of thecomputation, the sample can be skipped at the RF front end (e.g., noteven selected for analog-to-digital conversion). Alternatively, a samplemay be skipped in an offset estimator.

Multi-path is a major source of error in a GPS receiver and othertime-of-flight measurement systems. The multi-path error can be detectedusing the accumulator results of the sections that have a transition(i.e., category 1 sections, when single-T categorization and masking areused). In one embodiment, a difference in accumulated values betweenadjacent samples A_(δ)(x) may be used to find the signal that arrivedthe earliest, which is more likely to be a line-of-sight path:

A _(δ)(x)=A(1,x)A(1,x−1)   (93)

In this regard, the total number of samples N_(s2)(x) accumulated in thetwo accumulators is a useful parameter, given by:

N _(s2)(X)=N _(s)(1,x)+N _(s)(1,x−1)   (94)

When the following inequality is satisfied for any relative offset x,one may consider a signal detected:

$\begin{matrix}{{{A_{\delta}(x)}} > {\alpha_{A}\sqrt{N_{s\; 2}p_{y}}}} & (95)\end{matrix}$

Among the detected signal, the one with the earliest relative offset maybe considered a line-of-sight signal. α_(A) is a design parameter, whichis a given value between 2 and 3, in one embodiment. To avoid amulti-path error, skipping samples that contribute to measuring an earlysignal should be avoided. In one embodiment, a sample is skipped when:

-   -   1. all samples with a greater relative offset (i.e., samples of        later arrival) are skipped; or    -   2. the sample has a greater offset (i.e., samples of later        arrival) than the offset of a signal detected based on equation        95.

The phase measurement may be obtained using any carrier-phase methodthat can be used to estimate an object's position. Carrier-phase methodsare described, for example, in the GPS/GNSS literature (e.g., “GlobalPosition System: Signals, Measurement and Performance” (“Enge”), byPratap Misra and Per Enge, and its cited references).

In a multipath environment, different components of the signal arrivingat different times to the receiver have different phases. Theaccumulator values and the correlation results can be used to improvethe phase estimation of the line-of-sight signal. In one embodiment, onecan use the phase of the correlation value of the earliest arrivingsignal as the carrier phase, since it is a good estimate of the carrierphase of the signal of the shortest path (i.e., the line-of-sightsignal). In another embodiment, one can detect the second earliestarriving signal using a method that is similar to that used to detectthe earliest arriving signal discussed above). If the second earliestarrived signal is detected, one can use the accumulator values that areassociated with offsets earlier or equal to the offset of the secondearliest arrived signal to calculate the carrier phase of theline-of-sight signal. In another embodiment, for simplicity, one can usethe accumulator values that are associated with offsets earlier or equalto the offset of the earliest arrived signal to calculate the carrierphase of the line of sight signal.

In applying any of the methods described above, one may trade-offbetween performance, power consumption and complexity. In someembodiments, some of the techniques described are not be used, or may beadjusted for a given application. For example, while the probabilitydistribution is used in some embodiments for offset measurement, othermethods exist that do not probability distribution directly. Forexample, in one embodiment a set of statistical states S(x) is kept bythe system. In that embodiment, offset measurement is achieved by:

-   -   1. initialize S(x) by the log likelihood of the prior        probability distribution of relative offset x.

S(x)=L(x)  (96)

-   -   2. accumulate samples and calculate correlations using these        samples.

Denote the result of the correlation for relative offset x as C_(b)(x):

-   -   3. construct function C_(b)(x) such that the sum of C_(b)(x)        over all relative offset x in the search space for relative        offsets is zero; that is:

$\begin{matrix}{{C_{b}^{\prime}(x)} = {{C_{b}(x)} - {\frac{1}{N_{x}}{\sum\limits_{x}{C_{b}(x)}}}}} & (97)\end{matrix}$

where N_(x) is the number of estimated offsets over the search space.

-   -   4. update S(x) using:

S ⁺(x)=S ⁻(x)α_(sc) C _(b)′(x)   (98)

where S⁻(x) and S⁺(x) are the states before and after the update, andwhere c is a design parameter, having the value, for example, 0.3 in oneembodiment.

-   -   5. keep only the positive terms in S(x)

$\begin{matrix}{{S(x)} = \left\{ \begin{matrix}{{S^{+}(x)},{{S^{+}(x)} > 0}} \\{0,{otherwise}}\end{matrix} \right.} & (99)\end{matrix}$

-   -   6. skip samples with relative offset x, if S(x)=0.    -   7. Repeat 2-6 until only one relative offset x remains; at which        point, report relative offset x as the offset estimation.

In this method, statistical state S(x) provides an indicator of theprobability distribution. When S(x) is small (e.g., S(x)=0), thecorresponding probability P(x) of relative offset x is small, and thusthe corresponding samples may be skipped.

The above detailed description is provided to illustrate specificembodiments of the present invention and is not intended to be limiting.Numerous variations and modifications within the scope of the presentinvention are possible. The present invention is set forth in theaccompanying claims.

I claim:
 1. A method for determining a distance from a source based on asignal received at a receiver, the received signal being a known probesignal transmitted from the source, the method comprising: retrievingaccumulated sums of categorized sections of the probe signal, wherein(i) each categorized section being of predetermined duration and whichis categorized into one of a predetermined number of categories based onsignal transitions represented by signal values in the categorizedsection; and (ii) each accumulated sum being formed by summing allsignal values of categorized sections of the probe signal that arecategorized to the same one of the categories; retrieving a receivedsignal; for each of a plurality of offsets: dividing the receivedsignal, after being delayed by the offset, into sections, each sectionbeing of the predetermined duration; and computing a correlation betweenthe received signal delayed by the offset and the probe signal, usingsignal values of the sections of the delayed received signal and theaccumulated sums.
 2. The method of claim 1, wherein each section iscategorized according to signal transitions within the section and thesignal transitions in one or more sections preceding or subsequent tothe section.
 3. The method of claim 1, wherein each section comprisesmultiple chips, wherein the predetermined duration comprises an integernumber of chips.
 4. The method of claim 3, wherein each section isbounded in time by mid-points of two selected chips.
 5. The method ofclaim 1, wherein the received comprises digital signal values outputfrom an RF front end circuit.
 6. The method of claim 1, wherein eachsignal value of the received signal is represented by a complex numberformed by an in-phase value and a quadrature sample of the receivedsignal.
 7. The method of claim 1, wherein the offsets are each relativeto a coarse estimation offset value.
 8. The apparatus of claim 7,wherein the coast estimation offset value is received in communicationfrom a server over a telecommunication network.
 9. The method of claim1, wherein the correlation is computes after applying a masking functionthe accumulated sums and the signal values of the sections of thedelayed received signal.
 10. The method of claim 9, wherein multiplyingthe masking function with itself result in unity.
 11. The method ofclaim 1, further comprising selecting as an expected offset the offsetcorresponding to the greatest one of the computed correlations.
 12. Themethod of claim 11, further comprising computing one or more of: a powerof the received signal, an expected gain of a communication channel, astandard deviation of an additive noise, and a signal-to-noise ratio.13. The method of claim 1, further comprising maintaining a plurality ofstatistical states based on the computed correlations.
 14. The method ofclaim 13, wherein the statistical states relate to a probabilitydistribution.
 15. The method of claim 13, wherein the statistical statesrelate to a logarithm of a probability distribution.
 16. The method ofclaim 14, the statistical states are computed based on an additiveGaussian noise model.
 17. The method of claim 14, wherein one of thestatistical states relate to a probability distribution and wherein oneor more signal values of the delayed received signal are excluded from acomputed correlation when the offset of delayed received signalcorresponds to a probability in the probability distribution that isless than a predetermined threshold.
 18. The method of claim 17, whereinthe probability distribution is updated over time.
 19. The method ofclaim 1, wherein signal values of one or more sections of the delayedreceived signal are excluded from the computed correlations.
 20. Themethod of claim 1, wherein a signal value in a section of the delayedreceived signal is included in the computed correlation when the signalvalue follows a signal transition.
 21. The method of claim 1, whereineach correlation is computed based on earlier computed correlations,weighted by a factor that decays over time.
 22. The method of claim 1,further comprising estimating a frequency and a phase of the delayedreceived signal.
 23. The method of claim 22, wherein the frequency andthe phase are estimated using a Kalman filter.